<template>
  <div class="classification">
    <div class="classification_header">
      <div class="title">
        <router-link to="/" tag="i">
          <i class="iconfont icon-fanhui"></i>
          <span>游戏</span>
        </router-link>
        <input type="text" value="55">
        <i class="iconfont icon-xiazai"></i>
      </div>
    </div>
    <div class="classContent">
      <div class="tab">
        <div class="item" v-for="(item,index) in classItem" :key="index">
          <img :src="item.img" alt>
          <span>{{item.txt}}</span>
        </div>
      </div>
      <type-list :gameListArr="gameListArr"/>
    </div>
  </div>
</template>
<script>
import typeList from "./com/typeList";
export default {
  name: "classification",
  data() {
    return {
      classItem: [
        {
          img: require("../../assets/img/棋牌.png"),
          txt: "棋牌",
          id: "1"
        },
        {
          img: require("../../assets/img/付费.png"),
          txt: "付费",
          id: "2"
        },
        {
          img: require("../../assets/img/网游.png"),
          txt: "网游",
          id: "3"
        },
        {
          img: require("../../assets/img/小游戏.png"),
          txt: "小游戏",
          id: "4"
        },
        {
          img: require("../../assets/img/直播.png"),
          txt: "直播",
          id: "5"
        }
      ],
      gameListArr: [
        {
          img: require("../../assets/img/003.png"),
          name: "绝地求生-刺激战场",
          nnt: "1.2",
          mb: "32.5",
          hot: "热门一个游戏，进来组队玩一把......"
        }
      ]
    };
  },
  components: {
    typeList
  }
};
</script>
<style lang="stylus" scoped>
.classification {
  .classification_header {
    height: 2.33rem;
    background: linear-gradient(90deg, rgba(0, 174, 255, 1), rgba(0, 180, 255, 1), rgba(0, 120, 255, 1));
    padding-top: 0.69rem;
    box-sizing: border-box;

    .title {
      color: #fff;
      font-size: 14px;
      padding: 0 10px;
      box-sizing: border-box;
      height: 0.51rem;
      line-height: 0.51rem;
      margin-bottom: 0.35rem;

      input {
        width: 4.36rem;
        height: 100%;
        border-radius: 5px;
        margin: 0 0.5rem 0 0.35rem;
        padding-left: 20px;
      }
    }
  }

  .classContent {
    width: 7.1rem;
    margin: 0 auto;
    position: relative;
    top: -35px;

    .tab {
      height: 1.4rem;
      border-radius: 10px;
      background: #fff;
      display: flex;
      justify-content: space-between;
      margin-bottom: 10px;

      .item {
        flex: 1;
        box-sizing: border-box;
        padding: 10px 0;
        position: relative;

        img {
          display: block;
          margin: 5px auto;
          position: relative;
        }

        span {
          display: block;
          font-size: 14px;
          position: absolute;
          width: 100%;
          left: 50%;
          transform: translateX(-50%);
          bottom: 10px;
          text-align: center;
        }
      }

      .item:nth-child(1) {
        img {
          width: 20px;
          height: 21px;
        }
      }

      .item:nth-child(2) {
        img {
          width: 17px;
          height: 20px;
        }
      }

      .item:nth-child(3) {
        img {
          width: 20px;
          height: 14px;
          top: 5px;
        }
      }

      .item:nth-child(4) {
        img {
          width: 16px;
          height: 16px;
          top: 5px;
        }
      }

      .item:nth-child(5) {
        img {
          width: 17px;
          height: 14px;
          top: 5px;
        }
      }
    }
  }
}
</style>
